<?php
/**
 * @version	$Id: cleanup.php 19 2011-02-09 00:43:17Z gregdaynes@gmail.com $
 * @package	jEvolve.SyncrClient
 * @copyright  Copyright (C) 2010 jEvolve, LLC. All rights reserved.
 * @license	GNU General Public License
 */

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

jimport('joomla.application.component.model');

class SyncrModelCleanup extends JModel
{
	var $_log = null;
	
	function __construct() {
		parent::__construct();
		
		// new class
		$evl = new evolveLibrary;
		
		// load some evl stuff
		$this->_log = $evl->loadHelper('log');
	}
	
	public function getData()
	{	
		$db = &JFactory::getDBO();
		
		$query = 'SELECT id'
			   .' FROM #__syncr_content'
			   .' WHERE process_id = '.JRequest::getInt('processId', 0)
			   ;
		$db->setQuery($query);
		$id = $db->loadResult();
	
		$row =& $this->getTable('content', 'Table');
		$row->delete($id);
		
		return;
	}
}